import React, {useContext, useEffect} from 'react';
import {View, Text, Button, Platform} from 'react-native';
import {useMount, useDebounceEffect} from 'ahooks';
import dayjs from 'dayjs';
import {useRoute} from '@react-navigation/native';
import {useSelector, useDispatch} from 'react-redux';
import GlobalContext from '@/GlobalContext';
import CkList from './CkList';
// import Entry from './Entry';
import Android from './Android';
import IOS from './IOS';
import CheckPoswerStorage from '@/OsPowers/Storage/index';
export default ({navigation}) => {
  const dispatch = useDispatch();
  const routeData = useSelector(state => state.routeData.value);
  const routeMy = useRoute();
  const isShow = routeData?.name === routeMy?.name;

  if (!isShow) {
    return <></>;
  }
  return (
    <CheckPoswerStorage>
      <CkList>{(Platform.OS === 'ios' && <IOS />) || <Android />}</CkList>
    </CheckPoswerStorage>
  );
};
